import request from "@/utils/request";

export function fetchList(params) {
  return request({
    url: "/wx-abnormal/v1/list",
    method: "get",
    params: params,
  });
}

export function deleteWxAbnormal(id) {
  return request({
    url: "/wx-abnormal/v1/delete/" + id,
    method: "delete",
  });
}

export function createWxAbnormal(data) {
  return request({
    url: "/wx-abnormal/v1/create",
    method: "post",
    data: data,
  });
}

export function updateWxAbnormal(id, data) {
  return request({
    url: "/wx-abnormal/v1/update",
    method: "put",
    data: data,
  });
}

export function CheckWxAbnormal(id, rename) {
  return request({
    url: "/wx-abnormal/v1/checkCompanyWxCode/" + id + "&" + rename,
    method: "get",
  });
}

export function getCompanyList(params) {
  return request({
    url: "/wx-abnormal/v1/getCompanyList",
    method: "get",
    params: params,
  });
}

export function getOne(id) {
  return request({
    url: "/wx-abnormal/v1/getOne/" + id,
    method: "get",
  });
}
